A good answer might be:

An IOException is thrown and caught by the program.

The write() Method

With FileWriter use the write() method to write characters to the file. There are several write() methods with different parameters inherited from Writer and OutputStreamWriter. The example program uses the methods that writes characters from a string:

public void write(String str)  throws IOException

To output numerical results as characters use string concatenation:

int answer;
. . .

stream.write( "The answer is: " + answer) 

QUESTION 10:

What two data transformations are performed when this statement is executed?